import pickle

class Area:
    def __init__(self, a, h):
        self.a = a
        self.h = h
        self.area = self.a * self.h
    def getarea(self):
        return self.area

class RectangleArea(Area):
    pass

class TriangleArea(Area):
    def getarea(self):
        return self.area / 2

class CircleArea(Area):
    def __init__(self, r):
        Pi = 3
        super().__init__(r, r * Pi)

class AddSerialization:
    def dumps(self):
        return pickle.dumps(self)

class CircleArea_Super(AddSerialization, CircleArea):
    pass

a = RectangleArea(5 , 12)
print(a.getarea())

b = TriangleArea(18,6)
print(b.getarea())

c = CircleArea(9)
print(c.getarea())

d = CircleArea_Super(6)
print(d.getarea())
print(d.dumps())